#pragma once

#include <map>
#include <sstream>
#include <string>

typedef void CURL;

typedef struct HttpMsg
{
	int responseLen;
	std::string method;
	mutable std::map<std::string, std::string> header;
	std::stringstream body;

	bool Is(const std::string& Type) const;
	std::string HeaderAsStr(void) const;
	int Send(CURL* curl, int val, const char* curlError);
	int RecvHttpStream(CURL* curl, int val, int contentLen = 0);
	int Recv(CURL* curl, int val = 100);
} HttpMsg;